package utils

import (
	"fmt"
	"time"
)

// GetNowFormatTodayTime 获得当前时间
func GetNowFormatTodayTime() string {
	now := time.Now()
	dateStr := fmt.Sprintf("%02d-%02d-%02d", now.Year(), now.Month(), now.Day())
	return dateStr
}

// FormatTime 格式化时间
func FormatTime(t *time.Time) string {
	if t == nil {return ""}
	return t.Format("2006-01-02 15:04:05")
}